using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._Raster._Surface
{
    /// <summary>
    /// <para>Contour</para>
    /// <para>Creates a feature class of contours from a raster surface.</para>
    /// <para>从栅格表面创建等值线要素类。</para>
    /// </summary>    
    [DisplayName("Contour")]
    public class Contour : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Contour()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para>The input surface raster.</para>
        /// <para>输入表面栅格。</para>
        /// </param>
        /// <param name="_out_polyline_features">
        /// <para>Output feature class</para>
        /// <para>The output contour features.</para>
        /// <para>输出轮廓特征。</para>
        /// </param>
        /// <param name="_contour_interval">
        /// <para>Contour interval</para>
        /// <para><xdoc>
        ///   <para>The interval, or distance, between contour lines.</para>
        ///   <para>This can be any positive number.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>等值线之间的间隔或距离。</para>
        ///   <para>这可以是任何正数。</para>
        /// </xdoc></para>
        /// </param>
        public Contour(object _in_raster, object _out_polyline_features, double? _contour_interval)
        {
            this._in_raster = _in_raster;
            this._out_polyline_features = _out_polyline_features;
            this._contour_interval = _contour_interval;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Contour";

        public override string CallName => "3d.Contour";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "cellSize", "cellSizeProjectionMethod", "configKeyword", "extent", "geographicTransformations", "maintainSpatialIndex", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "parallelProcessingFactor", "scratchWorkspace", "snapRaster", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_polyline_features, _contour_interval, _base_contour, _z_factor, _contour_type.GetGPValue(), _max_vertices_per_feature];

        /// <summary>
        /// <para>Input raster</para>
        /// <para>The input surface raster.</para>
        /// <para>输入表面栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output feature class</para>
        /// <para>The output contour features.</para>
        /// <para>输出轮廓特征。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output feature class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_polyline_features { get; set; }


        /// <summary>
        /// <para>Contour interval</para>
        /// <para><xdoc>
        ///   <para>The interval, or distance, between contour lines.</para>
        ///   <para>This can be any positive number.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>等值线之间的间隔或距离。</para>
        ///   <para>这可以是任何正数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Contour interval")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _contour_interval { get; set; }


        /// <summary>
        /// <para>Base contour</para>
        /// <para><xdoc>
        ///   <para>The base contour value.</para>
        ///   <para>Contours are generated above and below this value as needed to cover the entire value range of the input raster. The default is zero.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>基本等值线值。</para>
        ///   <para>根据需要在此值上方和下方生成等值线，以覆盖输入栅格的整个值范围。默认值为零。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Base contour")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _base_contour { get; set; } = 0;


        /// <summary>
        /// <para>Z factor</para>
        /// <para><xdoc>
        ///   <para>The unit conversion factor used when generating contours. The default value is 1.</para>
        ///   <para>The contour lines are generated based on the z-values in the input raster, which are often measured in units of meters or feet. With the default value of 1, the contours will be in the same units as the z-values of the input raster. To create contours in a unit other than that of the z-values, set an appropriate value for the z-factor. It is not necessary to have the ground x,y and surface z-units be consistent for this tool.</para>
        ///   <para>For example, if the elevation values in your input raster are in feet, but you want the contours to be generated based on units of meters, set the z-factor to 0.3048 (since 1 foot = 0.3048 meter).</para>
        ///   <para>For another example, consider an input raster in WGS_84 geographic coordinates and elevation units of meters for which you want to generate contour lines every 100 feet with a base of 50 feet (so the contours will be 50 ft, 150 ft, 250 ft, and so on). To do this, set the Contour interval to 100, the Base contour to 50, and the Z factor to 3.2808 (since 1 meter = 3.2808 feet).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>生成等值线时使用的单位转换系数。默认值为 1。</para>
        ///   <para>等值线是根据输入栅格中的 z 值生成的，z 值通常以米或英尺为单位进行测量。默认值为 1 时，等值线的单位将与输入栅格的 z 值相同。要以 z 值以外的单位创建等值线，请为 z 因子设置适当的值。对于此工具，不必使地面 x，y 和表面 z 单位保持一致。</para>
        ///   <para>例如，如果输入栅格中的高程值以英尺为单位，但您希望基于米单位生成等值线，请将 z 因子设置为 0.3048（因为 1 英尺 = 0.3048 米）。</para>
        ///   <para>对于另一个示例，考虑以WGS_84地理坐标和高程单位表示的输入栅格，您希望每 100 英尺生成一次基底为 50 英尺的等值线（因此等值线将为 50 英尺、150 英尺、250 英尺等）。为此，请将等值线间隔设置为 100，将基本等值线设置为 50，将 Z 因子设置为 3.2808（因为 1 米 = 3.2808 英尺）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        /// <summary>
        /// <para>Contour type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of output. The output can represent the contours as either lines or polygons. There are several options for polygons.</para>
        ///   <bulletList>
        ///     <bullet_item>Contour—A polyline feature class of contours (isolines). This is the default.</bullet_item><para/>
        ///     <bullet_item>Contour polygon—A polygon feature class of filled contours.</bullet_item><para/>
        ///     <bullet_item>Contour shell—A polygon feature class in which the upper bound of the polygon increases cumulatively by the interval value. The lower bound remains constant at the raster minimum.</bullet_item><para/>
        ///     <bullet_item>Contour shell up—A polygon feature class in which the lower bound of the polygon increases cumulatively, from the raster minimum, by the interval value. The upper bound remains constant at the raster maximum.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出的类型。输出可以将等值线表示为直线或面。多边形有多种选择。</para>
        ///   <bulletList>
        ///     <bullet_item>等值线 - 等值线（等值线）的折线要素类。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>等值线面 - 填充等值线的面要素类。</bullet_item><para/>
        ///     <bullet_item>等值线壳 - 一个面要素类，其中面的上限随区间值累积增加。下限在栅格最小值处保持不变。</bullet_item><para/>
        ///     <bullet_item>等值线 - 一个面要素类，其中面的下限从栅格最小值累积增加区间值。上限在栅格最大值处保持不变。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Contour type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _contour_type_value _contour_type { get; set; } = _contour_type_value._CONTOUR;

        public enum _contour_type_value
        {
            /// <summary>
            /// <para>Contour</para>
            /// <para>Contour—A polyline feature class of contours (isolines). This is the default.</para>
            /// <para>等值线 - 等值线（等值线）的折线要素类。这是默认设置。</para>
            /// </summary>
            [Description("Contour")]
            [GPEnumValue("CONTOUR")]
            _CONTOUR,

            /// <summary>
            /// <para>Contour polygon</para>
            /// <para>Contour polygon—A polygon feature class of filled contours.</para>
            /// <para>等值线面 - 填充等值线的面要素类。</para>
            /// </summary>
            [Description("Contour polygon")]
            [GPEnumValue("CONTOUR_POLYGON")]
            _CONTOUR_POLYGON,

            /// <summary>
            /// <para>Contour shell</para>
            /// <para>Contour shell—A polygon feature class in which the upper bound of the polygon increases cumulatively by the interval value. The lower bound remains constant at the raster minimum.</para>
            /// <para>等值线壳 - 一个面要素类，其中面的上限随区间值累积增加。下限在栅格最小值处保持不变。</para>
            /// </summary>
            [Description("Contour shell")]
            [GPEnumValue("CONTOUR_SHELL")]
            _CONTOUR_SHELL,

            /// <summary>
            /// <para>Contour shell up</para>
            /// <para>Contour shell up—A polygon feature class in which the lower bound of the polygon increases cumulatively, from the raster minimum, by the interval value. The upper bound remains constant at the raster maximum.</para>
            /// <para>等值线 - 一个面要素类，其中面的下限从栅格最小值累积增加区间值。上限在栅格最大值处保持不变。</para>
            /// </summary>
            [Description("Contour shell up")]
            [GPEnumValue("CONTOUR_SHELL_UP")]
            _CONTOUR_SHELL_UP,

        }

        /// <summary>
        /// <para>Maximum vertices per feature</para>
        /// <para><xdoc>
        ///   <para>The vertex limit when subdividing a feature. This should only be used when output features contain a very large number of vertices (many millions).</para>
        ///   <para>This parameter is intended as a way to subdivide extremely large features that can cause issues later on, for example, when storing, analyzing, or drawing the features.</para>
        ///   <para>If left empty, the output features will not be split. The default is empty.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>细分要素时的顶点限制。仅当输出要素包含非常多的折点（数百万个折点）时，才应使用此选项。</para>
        ///   <para>此参数旨在细分可能在以后导致问题的超大要素，例如，在存储、分析或绘制要素时。</para>
        ///   <para>如果留空，则不会拆分输出要素。默认值为空。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum vertices per feature")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _max_vertices_per_feature { get; set; } = null;


        public Contour SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object cellSize = null, object configKeyword = null, object extent = null, object geographicTransformations = null, bool? maintainSpatialIndex = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object snapRaster = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, cellSize: cellSize, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, maintainSpatialIndex: maintainSpatialIndex, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, workspace: workspace);
            return this;
        }

    }

}